package com.suixun.domain;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 案例展示
 * </p>
 *
 * @author jacky
 * @since 2018-01-11
 */
@TableName("case_display")
public class CaseDisplay extends Model<CaseDisplay> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Integer id;
    /**
     * 标题
     */
	@Size(max = 100, message = "标题长度不能大于100")
	@NotBlank(message = "标题不能为空")
	private String title;
    /**
     * 简介
     */
	@Size(max = 500, message = "简介长度不能大于500")
	@NotBlank(message = "简介不能为空")
	private String introduce;
    /**
     * 内容
     */
	@Size(max = 10000, message = "内容详情长度不能大于10000")
	@NotBlank(message = "内容不能为空")
	private String content;
    /**
     * 置顶
     */
	private String top;
	@TableField("create_time")
	private Date createTime;
	@TableField("update_time")
	private Date updateTime;
	/**
	 * 是否展示 0不展示 1展示
	 */
	@TableField("is_show")
	private Integer isShow;


	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTop() {
		return top;
	}

	public void setTop(String top) {
		this.top = top;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getIsShow() {
		return isShow;
	}

	public void setIsShow(Integer isShow) {
		this.isShow = isShow;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "CaseDisplay{" +
			", id=" + id +
			", title=" + title +
			", introduce=" + introduce +
			", content=" + content +
			", top=" + top +
			", createTime=" + createTime +
			", updateTime=" + updateTime +
			", isShow=" + isShow +
			"}";
	}
}
